﻿
	<title>订单管理 - 订单详情</title>
	<style type="text/css">
		.pagination li{list-style:none;float:left;margin-left:10px;
			padding:0 10px;
			background-color:#5a98de;
			border:1px solid #ccc;
			height:26px;
			line-height:26px;
			cursor:pointer;
			color:#fff;
		}
		.pagination li a{color:white;padding: 0;line-height: inherit;border: none;}
		.pagination li a:hover{background-color: #5a98de;}
		.pagination li.active{background-color:white;color:gray;}
		.pagination li.disabled{background-color:white;color:gray;}
	</style>
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		订单管理
		<span class="c-gray en">&gt;</span>
		订单详情 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a> </nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="text-l">
				<div>订单编号：{$order.order_sn}</div>
				<div>用户id：{$order.user_id}</div>
				<div>用户昵称：{$order.user.nickname}</div>
				<div>订单应付金额：{$order.order_amount}</div>
				<div>订单状态：{$order.order_status}</div>
			</div>
			<table class="table table-border table-bordered table-bg table-sort">
				<thead>
					<tr>
						<th scope="col" colspan="9">订单商品</th>
					</tr>
					<tr class="text-c">
						<th width="40">ID</th>
						<th width="60">spu/sku</th>
						<th width="">商品名称</th>
						<th width="50">商品logo</th>
						<th width="100">商品价格</th>
						<th width="50">购买数量</th>
						<th width="150">规格值</th>
						<th width="50">是否评价</th>
						<th width="50">发货状态</th>
					</tr>
				</thead>
				<tbody>
					{foreach $order->order_goods as $v}
					<tr class="text-c">
						<td>{$v.id}</td>
						<td>{$v.goods_id}/{$v.spec_goods_id}</td>
						<td>{$v.goods_name}</td>
						<td><img src="{$v.goods_logo}"></td>
						<td>{$v.goods_price}</td>
						<td>{$v.number}</td>
						<td>{$v.spec_value_names}</td>
						<td>{$v.is_comment}</td>
						<td>{$v.status}</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
		</article>
	</div>
</section>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/static/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/admin/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/static/admin/logic/curd.js"></script>
<script type="text/javascript">
	$(function(){
		/*$('.table-sort').dataTable({
			"aaSorting": [[ 1, "desc" ]],//默认第几个排序
			"bStateSave": true,//状态保存
			"aoColumnDefs": [
				{"orderable":false,"aTargets":[0,7]}// 制定列不参与排序
			]
		});*/
	});
	/*
	 参数解释：
	 title	标题
	 url		请求的url
	 id		需要操作的数据id
	 w		弹出层宽度（缺省调默认值）
	 h		弹出层高度（缺省调默认值）
	 */
	/*订单-停用*/
	function admin_stop(obj,id){
		layer.confirm('确认要停用吗？',function(index){
			//此处请求后台程序，下方是成功后的前台处理……

			$(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_start(this,id)" href="javascript:;" title="启用" style="text-decoration:none"><i class="Hui-iconfont">&#xe615;</i></a>');
			$(obj).parents("tr").find(".td-status").html('<span class="label label-default radius">已禁用</span>');
			$(obj).remove();
			layer.msg('已停用!',{icon: 5,time:1000});
		});
	}

	/*订单-启用*/
	function admin_start(obj,id){
		layer.confirm('确认要启用吗？',function(index){
			//此处请求后台程序，下方是成功后的前台处理……

			$(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_stop(this,id)" href="javascript:;" title="停用" style="text-decoration:none"><i class="Hui-iconfont">&#xe631;</i></a>');
			$(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
			$(obj).remove();
			layer.msg('已启用!', {icon: 6,time:1000});
		});
	}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>